const val NAME = "Jimmy's friend"
const val NAMES = "Jimmy,jacky,jason"
fun main() {
    val index = NAME.indexOf('\'')
    var str = NAME.substring(0 until index)
    println(str)

    val data = NAME.split(",")
    val (origin,dest,proxy) = NAMES.split(",")
    println("$origin $dest $proxy")

    var str1 = "the people's republic of china."
    var str2 = str1.replace(Regex("[aeiou]")){
        when(it.value) {
            "a"->"8"
            "e"->"2"
            "i"->"1"
            "o"->"3"
            "u"->"9"
            else -> it.value
        }
    }
    println(str1)
    println(str2)
}